The first thing I am going to do is get the program reading from the input ports and displaying on the LCD. This will convince me that I can drive the LCD and read the ports fast enough. I am also going to use the LCD library we created in Practical 5. What I want is a program which will read PORTA bit 0 and display either "up
" or "down
" depending on the state of the pin. The "up
" or "down
" message must be displayed in the top left hand corner of the display. On the right hand side you can see a more detailed set of requirements along with some hints.
Requirement |
Hint |
The program should display " |
Look at Exercise 2.1 to find out how to configure PORTA for reading and read the state of a bit. |
The program must perform the update repeatedly. |
Sounds like a job for an infinite while loop. |
The program must draw the " |
You will need to use the lcd functions. You must therefore create a project, include the appropriate file and set up and use the LCD panel. Look at program Exercise 5.1 for details how to call the LCD functions. |